package com.xsky.logic.knowledge;

import java.util.Date;

import com.xsky.common.util.UUIDUtil;
import com.xsky.database.dao.impl.BaseEntityDaoImpl;
import com.xsky.operation.vo.TabKnowledgeBase;
import com.xsky.operation.vo.TabKnowledgeModifyHistory;

public class KnowledgeHistoryLogic {
	BaseEntityDaoImpl baseDao = new BaseEntityDaoImpl();

	// 增加
	public void add(TabKnowledgeBase base, String modifyType) {
		TabKnowledgeModifyHistory entity = new TabKnowledgeModifyHistory();
		entity.setId(UUIDUtil.getUUID());
		entity.setBaseId(base.getId());
		entity.setStatus(base.getStatus() + "");
		entity.setEngineerEmail(base.getEngineerEmail());
		entity.setEngineerJn(base.getEngineerJn());
		entity.setEngineerPhone(base.getEngineerPhone());
		entity.setEngineerRealname(base.getEngineerRealname());
		entity.setModifyType(modifyType);
		entity.setModifyTime(new Date());

		baseDao.insertEntity(entity);
	}
}
